#define _CRT_SECURE_NO_WARNINGS
//#include <stdio.h>
//int main()
//{
//    double arr[5][5] = { 0 };
//    int i = 0, j = 0;
    /*for (i = 0; i < 5; i++)
    {
        for (j = 0; j < 5; j++)
        {
            scanf("%f ", &arr[i][j]);
        }
//    }*/
   /* for (i = 0; i < 5; i++)
    {
        for (j = 0; j < 5; j++)
        {
            printf("%.1f ", arr[i][j]);
        }
        double sum = arr[i][0] + arr[i][1] + arr[i][2] + arr[i][3] + arr[i][4];
        printf("%.1f\n", sum);
    }*/
//    return 0;
//}

#include<stdio.h>
int main()
{
    int i = 0, j = 0;
	double arr[5][5] = { 0 };
    for (i = 0; i < 5; i++)
    {
        for (j = 0; j < 5; j++)
        {
            scanf("%f ", &arr[i][j]);
        }
    }
	for (i = 0; i < 5; i++)
	{
		for (j = 0; j < 5; j++)
		{
			printf("%.1f ", arr[i][j]);
		}
		double sum = arr[i][0] + arr[i][1] + arr[i][2] + arr[i][3] + arr[i][4];
		printf("%.1f\n", sum);
	}
		
	
	return 0;
}